<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<!--      <el-form-item label="金融机构代码" prop="financingInstitutionCode">-->
<!--        <el-input-->
<!--          v-model="queryParams.financingInstitutionCode"-->
<!--          placeholder="请输入金融机构代码"-->
<!--          clearable-->
<!--          size="small"-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="内部机构号" prop="insideInstitutionCode">-->
<!--        <el-input-->
<!--          v-model="queryParams.insideInstitutionCode"-->
<!--          placeholder="请输入内部机构号"-->
<!--          clearable-->
<!--          size="small"-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="金融机构地区代码" prop="financingInstitutionAreaCode">-->
<!--        <el-input-->
<!--          v-model="queryParams.financingInstitutionAreaCode"-->
<!--          placeholder="请输入金融机构地区代码"-->
<!--          clearable-->
<!--          size="small"-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="贴现方式" prop="discountWay">-->
<!--        <el-input-->
<!--          v-model="queryParams.discountWay"-->
<!--          placeholder="请输入贴现方式"-->
<!--          clearable-->
<!--          size="small"-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="票据介质" prop="ticketMedium">-->
<!--        <el-input-->
<!--          v-model="queryParams.ticketMedium"-->
<!--          placeholder="请输入票据介质"-->
<!--          clearable-->
<!--          size="small"-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
      <el-form-item label="票据编号" prop="ticketCode">
        <el-input
          v-model="queryParams.ticketCode"
          placeholder="请输入票据编号"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label=贴现申请人名称 prop="discountApplicantName" label-width="120px">
        <el-input
          v-model="queryParams.discountApplicantName"
          placeholder="贴现申请人名称"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
<!--      <el-form-item label="贴现申请人证件代码" prop="discountApplicantCardCode">-->
<!--        <el-input-->
<!--          v-model="queryParams.discountApplicantCardCode"-->
<!--          placeholder="请输入贴现申请人证件代码"-->
<!--          clearable-->
<!--          size="small"-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="贴现申请人国民经济部门" prop="discountApplicantDept">-->
<!--        <el-input-->
<!--          v-model="queryParams.discountApplicantDept"-->
<!--          placeholder="请输入贴现申请人国民经济部门"-->
<!--          clearable-->
<!--          size="small"-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="贴现申请人行业" prop="discountApplicantIndustry">-->
<!--        <el-input-->
<!--          v-model="queryParams.discountApplicantIndustry"-->
<!--          placeholder="请输入贴现申请人行业"-->
<!--          clearable-->
<!--          size="small"-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="贴现申请人地区代码" prop="discountApplicantAreaCode">-->
<!--        <el-input-->
<!--          v-model="queryParams.discountApplicantAreaCode"-->
<!--          placeholder="请输入贴现申请人地区代码"-->
<!--          clearable-->
<!--          size="small"-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="贴现申请人经济成分" prop="discountApplicantEconomicSector">-->
<!--        <el-input-->
<!--          v-model="queryParams.discountApplicantEconomicSector"-->
<!--          placeholder="请输入贴现申请人经济成分"-->
<!--          clearable-->
<!--          size="small"-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="贴现申请人企业规模" prop="discountApplicantEnterpriseScale">-->
<!--        <el-input-->
<!--          v-model="queryParams.discountApplicantEnterpriseScale"-->
<!--          placeholder="请输入贴现申请人企业规模"-->
<!--          clearable-->
<!--          size="small"-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="承兑人名称" prop="acceptorName">-->
<!--        <el-input-->
<!--          v-model="queryParams.acceptorName"-->
<!--          placeholder="请输入承兑人名称"-->
<!--          clearable-->
<!--          size="small"-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="承兑人证件代码" prop="acceptorCardCode">-->
<!--        <el-input-->
<!--          v-model="queryParams.acceptorCardCode"-->
<!--          placeholder="请输入承兑人证件代码"-->
<!--          clearable-->
<!--          size="small"-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="出票人名称" prop="drawerName">-->
<!--        <el-input-->
<!--          v-model="queryParams.drawerName"-->
<!--          placeholder="请输入出票人名称"-->
<!--          clearable-->
<!--          size="small"-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="出票人证件代码" prop="drawerCardCode">-->
<!--        <el-input-->
<!--          v-model="queryParams.drawerCardCode"-->
<!--          placeholder="请输入出票人证件代码"-->
<!--          clearable-->
<!--          size="small"-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="出票日期" prop="draftTime">-->
<!--        <el-date-picker clearable size="small"-->
<!--          v-model="queryParams.draftTime"-->
<!--          type="date"-->
<!--          value-format="yyyy-MM-dd"-->
<!--          placeholder="选择出票日期">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
<!--      <el-form-item label="票据到期日期" prop="billDueTime">-->
<!--        <el-date-picker clearable size="small"-->
<!--          v-model="queryParams.billDueTime"-->
<!--          type="date"-->
<!--          value-format="yyyy-MM-dd"-->
<!--          placeholder="选择票据到期日期">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
<!--      <el-form-item label="交易日期" prop="dealTime">-->
<!--        <el-date-picker clearable size="small"-->
<!--          v-model="queryParams.dealTime"-->
<!--          type="date"-->
<!--          value-format="yyyy-MM-dd"-->
<!--          placeholder="选择交易日期">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
<!--      <el-form-item label="币种" prop="currencies">-->
<!--        <el-input-->
<!--          v-model="queryParams.currencies"-->
<!--          placeholder="请输入币种"-->
<!--          clearable-->
<!--          size="small"-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="票面金额" prop="faceAmount">-->
<!--        <el-input-->
<!--          v-model="queryParams.faceAmount"-->
<!--          placeholder="请输入票面金额"-->
<!--          clearable-->
<!--          size="small"-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="票面金额折人民币" prop="faceAmountToRmb">-->
<!--        <el-input-->
<!--          v-model="queryParams.faceAmountToRmb"-->
<!--          placeholder="请输入票面金额折人民币"-->
<!--          clearable-->
<!--          size="small"-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="贴现币种" prop="discountCurrencies">-->
<!--        <el-input-->
<!--          v-model="queryParams.discountCurrencies"-->
<!--          placeholder="请输入贴现币种"-->
<!--          clearable-->
<!--          size="small"-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="贴现金额" prop="discountAmount">-->
<!--        <el-input-->
<!--          v-model="queryParams.discountAmount"-->
<!--          placeholder="请输入贴现金额"-->
<!--          clearable-->
<!--          size="small"-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="贴现金额折人民币" prop="discountAmountToRmb">-->
<!--        <el-input-->
<!--          v-model="queryParams.discountAmountToRmb"-->
<!--          placeholder="请输入贴现金额折人民币"-->
<!--          clearable-->
<!--          size="small"-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="贴现利率" prop="discountRate">-->
<!--        <el-input-->
<!--          v-model="queryParams.discountRate"-->
<!--          placeholder="请输入贴现利率"-->
<!--          clearable-->
<!--          size="small"-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="贷款质量" prop="loanQuality">-->
<!--        <el-input-->
<!--          v-model="queryParams.loanQuality"-->
<!--          placeholder="请输入贷款质量"-->
<!--          clearable-->
<!--          size="small"-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="贷款状态" prop="loanState">-->
<!--        <el-input-->
<!--          v-model="queryParams.loanState"-->
<!--          placeholder="请输入贷款状态"-->
<!--          clearable-->
<!--          size="small"-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
      <el-form-item label="完善状态" prop="perfectState">
        <el-select
          v-model="queryParams.perfectState"
          placeholder="请输入完善状态"
          clearable
          size="small"
          style="width: 240px"
        >
          <el-option
            v-for="dict in dict.type.perfect_log_state"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="创建时间">
        <el-date-picker
          v-model="dateRange"
          size="small"
          style="width: 240px"
          value-format="yyyy-MM-dd"
          type="daterange"
          range-separator="-"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
        ></el-date-picker>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-table v-loading="loading" :data="perfectLogList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
<!--      <el-table-column label="id" align="center" prop="id" />-->
<!--      <el-table-column label="金融机构代码" align="center" prop="financingInstitutionCode" />-->
<!--      <el-table-column label="内部机构号" align="center" prop="insideInstitutionCode" />-->
<!--      <el-table-column label="金融机构地区代码" align="center" prop="financingInstitutionAreaCode" />-->
<!--      <el-table-column label="贴现方式" align="center" prop="discountWay" />-->
<!--      <el-table-column label="票据种类" align="center" prop="ticketType" />-->
<!--      <el-table-column label="票据介质" align="center" prop="ticketMedium" />-->
      <el-table-column label="票据编号" align="center" prop="ticketCode" />
      <el-table-column label="贴现申请人名称" align="center" prop="discountApplicantName" />
<!--      <el-table-column label="贴现申请人证件类型" align="center" prop="discountApplicantCardType" />-->
      <el-table-column label="贴现申请人证件代码" align="center" prop="discountApplicantCardCode" />
      <el-table-column label="贴现申请人国民经济部门" align="center" prop="discountApplicantDept" />
      <el-table-column label="贴现申请人行业" align="center" prop="discountApplicantIndustry" />
      <el-table-column label="贴现申请人地区代码" align="center" prop="discountApplicantAreaCode" />
      <el-table-column label="贴现申请人经济成分" align="center" prop="discountApplicantEconomicSector" />
      <el-table-column label="贴现申请人企业规模" align="center" prop="discountApplicantEnterpriseScale" />
      <el-table-column label="承兑人名称" align="center" prop="acceptorName" />
<!--      <el-table-column label="承兑人证件类型" align="center" prop="acceptorCardType" />-->
      <el-table-column label="承兑人证件代码" align="center" prop="acceptorCardCode" />
      <el-table-column label="出票人名称" align="center" prop="drawerName" />
<!--      <el-table-column label="出票人证件类型" align="center" prop="drawerCardType" />-->
      <el-table-column label="出票人证件代码" align="center" prop="drawerCardCode" />
<!--      <el-table-column label="出票日期" align="center" prop="draftTime" width="180">-->
<!--        <template slot-scope="scope">-->
<!--          <span>{{ parseTime(scope.row.draftTime, '{y}-{m}-{d}') }}</span>-->
<!--        </template>-->
<!--      </el-table-column>-->
<!--      <el-table-column label="票据到期日期" align="center" prop="billDueTime" width="180">-->
<!--        <template slot-scope="scope">-->
<!--          <span>{{ parseTime(scope.row.billDueTime, '{y}-{m}-{d}') }}</span>-->
<!--        </template>-->
<!--      </el-table-column>-->
<!--      <el-table-column label="交易日期" align="center" prop="dealTime" width="180">-->
<!--        <template slot-scope="scope">-->
<!--          <span>{{ parseTime(scope.row.dealTime, '{y}-{m}-{d}') }}</span>-->
<!--        </template>-->
<!--      </el-table-column>-->
<!--      <el-table-column label="币种" align="center" prop="currencies" />-->
<!--      <el-table-column label="票面金额" align="center" prop="faceAmount" />-->
<!--      <el-table-column label="票面金额折人民币" align="center" prop="faceAmountToRmb" />-->
<!--      <el-table-column label="贴现币种" align="center" prop="discountCurrencies" />-->
<!--      <el-table-column label="贴现金额" align="center" prop="discountAmount" />-->
<!--      <el-table-column label="贴现金额折人民币" align="center" prop="discountAmountToRmb" />-->
<!--      <el-table-column label="贴现利率" align="center" prop="discountRate" />-->
<!--      <el-table-column label="贷款质量" align="center" prop="loanQuality" />-->
<!--      <el-table-column label="贷款状态" align="center" prop="loanState" />-->
      <el-table-column label="完善状态" align="center" prop="perfectState" >
        <template slot-scope="scope">
          <dict-tag :options="dict.type.perfect_log_state" :value="scope.row.perfectState"/>
        </template>
      </el-table-column>
      <el-table-column label="操作人" align="center" prop="createBy" >
      </el-table-column>
      <el-table-column label="创建时间" align="center" prop="createTime" >
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.createTime) }}</span>
        </template>
      </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
              size="mini"
              type="success"
              icon="el-icon-refresh"
              @click="handlePerfect(scope.row)"
              v-hasPermi="['server:perfectLog:perfect']"
              v-if="scope.row.perfectState!=='OK'"
            >手动完善</el-button>
        </template>
      </el-table-column>
    </el-table>

    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加或修改企业信息完善记录对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="金融机构代码" prop="financingInstitutionCode">
          <el-input v-model="form.financingInstitutionCode" placeholder="请输入金融机构代码" />
        </el-form-item>
        <el-form-item label="内部机构号" prop="insideInstitutionCode">
          <el-input v-model="form.insideInstitutionCode" placeholder="请输入内部机构号" />
        </el-form-item>
        <el-form-item label="金融机构地区代码" prop="financingInstitutionAreaCode">
          <el-input v-model="form.financingInstitutionAreaCode" placeholder="请输入金融机构地区代码" />
        </el-form-item>
        <el-form-item label="贴现方式" prop="discountWay">
          <el-input v-model="form.discountWay" placeholder="请输入贴现方式" />
        </el-form-item>
        <el-form-item label="票据介质" prop="ticketMedium">
          <el-input v-model="form.ticketMedium" placeholder="请输入票据介质" />
        </el-form-item>
        <el-form-item label="票据编号" prop="ticketCode">
          <el-input v-model="form.ticketCode" placeholder="请输入票据编号" />
        </el-form-item>
        <el-form-item label="贴现申请人证件代码" prop="discountApplicantCardCode">
          <el-input v-model="form.discountApplicantCardCode" placeholder="请输入贴现申请人证件代码" />
        </el-form-item>
        <el-form-item label="贴现申请人国民经济部门" prop="discountApplicantDept">
          <el-input v-model="form.discountApplicantDept" placeholder="请输入贴现申请人国民经济部门" />
        </el-form-item>
        <el-form-item label="贴现申请人行业" prop="discountApplicantIndustry">
          <el-input v-model="form.discountApplicantIndustry" placeholder="请输入贴现申请人行业" />
        </el-form-item>
        <el-form-item label="贴现申请人地区代码" prop="discountApplicantAreaCode">
          <el-input v-model="form.discountApplicantAreaCode" placeholder="请输入贴现申请人地区代码" />
        </el-form-item>
        <el-form-item label="贴现申请人经济成分" prop="discountApplicantEconomicSector">
          <el-input v-model="form.discountApplicantEconomicSector" placeholder="请输入贴现申请人经济成分" />
        </el-form-item>
        <el-form-item label="贴现申请人企业规模" prop="discountApplicantEnterpriseScale">
          <el-input v-model="form.discountApplicantEnterpriseScale" placeholder="请输入贴现申请人企业规模" />
        </el-form-item>
        <el-form-item label="承兑人名称" prop="acceptorName">
          <el-input v-model="form.acceptorName" placeholder="请输入承兑人名称" />
        </el-form-item>
        <el-form-item label="承兑人证件代码" prop="acceptorCardCode">
          <el-input v-model="form.acceptorCardCode" placeholder="请输入承兑人证件代码" />
        </el-form-item>
        <el-form-item label="出票人名称" prop="drawerName">
          <el-input v-model="form.drawerName" placeholder="请输入出票人名称" />
        </el-form-item>
        <el-form-item label="出票人证件代码" prop="drawerCardCode">
          <el-input v-model="form.drawerCardCode" placeholder="请输入出票人证件代码" />
        </el-form-item>
        <el-form-item label="出票日期" prop="draftTime">
          <el-date-picker clearable size="small"
            v-model="form.draftTime"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="选择出票日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="票据到期日期" prop="billDueTime">
          <el-date-picker clearable size="small"
            v-model="form.billDueTime"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="选择票据到期日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="交易日期" prop="dealTime">
          <el-date-picker clearable size="small"
            v-model="form.dealTime"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="选择交易日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="币种" prop="currencies">
          <el-input v-model="form.currencies" placeholder="请输入币种" />
        </el-form-item>
        <el-form-item label="票面金额" prop="faceAmount">
          <el-input v-model="form.faceAmount" placeholder="请输入票面金额" />
        </el-form-item>
        <el-form-item label="票面金额折人民币" prop="faceAmountToRmb">
          <el-input v-model="form.faceAmountToRmb" placeholder="请输入票面金额折人民币" />
        </el-form-item>
        <el-form-item label="贴现币种" prop="discountCurrencies">
          <el-input v-model="form.discountCurrencies" placeholder="请输入贴现币种" />
        </el-form-item>
        <el-form-item label="贴现金额" prop="discountAmount">
          <el-input v-model="form.discountAmount" placeholder="请输入贴现金额" />
        </el-form-item>
        <el-form-item label="贴现金额折人民币" prop="discountAmountToRmb">
          <el-input v-model="form.discountAmountToRmb" placeholder="请输入贴现金额折人民币" />
        </el-form-item>
        <el-form-item label="贴现利率" prop="discountRate">
          <el-input v-model="form.discountRate" placeholder="请输入贴现利率" />
        </el-form-item>
        <el-form-item label="贷款质量" prop="loanQuality">
          <el-input v-model="form.loanQuality" placeholder="请输入贷款质量" />
        </el-form-item>
        <el-form-item label="贷款状态" prop="loanState">
          <el-input v-model="form.loanState" placeholder="请输入贷款状态" />
        </el-form-item>
        <el-form-item label="完善状态" prop="perfectState">
          <el-input v-model="form.perfectState" placeholder="请输入完善状态" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { listPerfectLog,updatePerfect } from "@/api/server/perfectLog";

export default {
  name: "PerfectLog",
  dicts: ['perfect_log_state'],
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 企业信息完善记录表格数据
      perfectLogList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 日期范围
      dateRange: [],
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        financingInstitutionCode: null,
        insideInstitutionCode: null,
        financingInstitutionAreaCode: null,
        discountWay: null,
        ticketType: null,
        ticketMedium: null,
        ticketCode: null,
        discountApplicantName: null,
        discountApplicantCardType: null,
        discountApplicantCardCode: null,
        discountApplicantDept: null,
        discountApplicantIndustry: null,
        discountApplicantAreaCode: null,
        discountApplicantEconomicSector: null,
        discountApplicantEnterpriseScale: null,
        acceptorName: null,
        acceptorCardType: null,
        acceptorCardCode: null,
        drawerName: null,
        drawerCardType: null,
        drawerCardCode: null,
        draftTime: null,
        billDueTime: null,
        dealTime: null,
        currencies: null,
        faceAmount: null,
        faceAmountToRmb: null,
        discountCurrencies: null,
        discountAmount: null,
        discountAmountToRmb: null,
        discountRate: null,
        loanQuality: null,
        loanState: null,
        perfectState: null,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
      }
    };
  },
  created() {
    const taskId = this.$route.params && this.$route.params.taskId;
    this.queryParams.taskId = taskId;
    this.getList();
  },
  methods: {
    /** 查询企业信息完善记录列表 */
    getList() {
      this.loading = true;
      listPerfectLog(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
        this.perfectLogList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        financingInstitutionCode: null,
        insideInstitutionCode: null,
        financingInstitutionAreaCode: null,
        discountWay: null,
        ticketType: null,
        ticketMedium: null,
        ticketCode: null,
        discountApplicantCardType: null,
        discountApplicantCardCode: null,
        discountApplicantDept: null,
        discountApplicantIndustry: null,
        discountApplicantAreaCode: null,
        discountApplicantEconomicSector: null,
        discountApplicantEnterpriseScale: null,
        acceptorName: null,
        acceptorCardType: null,
        acceptorCardCode: null,
        drawerName: null,
        drawerCardType: null,
        drawerCardCode: null,
        draftTime: null,
        billDueTime: null,
        dealTime: null,
        currencies: null,
        faceAmount: null,
        faceAmountToRmb: null,
        discountCurrencies: null,
        discountAmount: null,
        discountAmountToRmb: null,
        discountRate: null,
        loanQuality: null,
        loanState: null,
        perfectState: null,
        createBy: null,
        createTime: null
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.dateRange = [];
      this.resetForm("queryForm");
      this.handleQuery();
    },
    /** 手动完善 */
    handlePerfect(row){
      const id = row.id;
      updatePerfect({ id: id}).then(response => {
        this.$modal.msgSuccess("操作成功");
        this.open = false;
        this.getList();
      });
    }
  }
};
</script>
